"HunterLarco/rules_graphql"

module(
    name = "rules_graphql",
    bazel_compatibility = [">=7.0.0"],
    compatibility_level = 1,
    version = "0.1.3",
)

bazel_dep(name = "aspect_rules_js", version = "2.4.0")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "rules_nodejs", version = "6.4.0")

bazel_dep(name = "aspect_bazel_lib", version = "2.21.2", dev_dependency = True)
bazel_dep(name = "aspect_rules_lint", version = "1.5.3", dev_dependency = True)
bazel_dep(name = "bazel_env.bzl", version = "0.4.0", dev_dependency = True)
bazel_dep(name = "bazelrc-preset.bzl", version = "1.0.1", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2", dev_dependency = True)

# Fixed version of pnpm for consistency.
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
pnpm.pnpm(pnpm_version = "9.15.9")
use_repo(pnpm, "pnpm")

# npm package manager
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
    name = "rules_graphql_npm",
    npmrc = "//:.npmrc",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "rules_graphql_npm")

# Ensure a fixed version of node for consistency.
node = use_extension(
    "@rules_nodejs//nodejs:extensions.bzl",
    "node",
)
node.toolchain(node_version = "20.18.0")
use_repo(node, "nodejs_toolchains")
